import 'package:window_manager/window_manager.dart';

/// @Author  leijingxing
/// @Date  2023/4/7 14:00
/// @LastEditTime: 2023/4/7 14:00
/// @LastEditors: leijingxing
/// @Description: 设置当前屏幕
abstract class WindowsUtils {
  // 是否全屏
  static bool isFull = false;
  // 是否置顶
  static bool isTop = false;
  // 设置全屏
  static settingFull() {
    WindowManager.instance.setFullScreen(isFull);
    isFull = !isFull;
  }

  // 最小化
  static minimize() {

    WindowManager.instance.minimize();
  }

  // 关闭退出系统
  static close() {
    WindowManager.instance.close();
  }

  // 置顶
  static setTop() {
    WindowManager.instance.setAlwaysOnTop(isTop);
  }

}
